package com.sqznkj.Dao;

import com.sqznkj.entity.certificate;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface certificateDao {
    @Insert("insert into certificate (title , url ,imgType)values(#{title}, #{url} ,  #{imgType})")
    int add(certificate cer);

    /**
     * 获取证书
     * @return
     */
    @Select("select * from certificate where imgType = 0")
    List<certificate> getzs();
    /**
     * 获取执照
     * @return
     */
    @Select("select * from certificate where imgType = 1")
    List<certificate> getzz();
}
